<?php

namespace app\api\validate;


class AddressNew extends BaseValidate
{
    // 为防止欺骗重写user_id外键
    // rule中严禁使用user_id
    // 获取post参数时过滤掉user_id
    // 所有数据库和user关联的外键统一使用user_id，而不要使用uid
    protected $rule = [
        'harvest_address' => 'require|isNotEmpty',
        'receiver'=>'require|isNotEmpty',
        'receiver_phone'=>'require|isMobile',
        'longitude' => 'require|isNotEmpty',
        'latitude' => 'require|isNotEmpty',
        'university_id'=>'require|isPositiveInteger',
        'type'=>'require|in:1,2',
    ];
}